﻿@model Kojarskiy.Models.LoginModel

@{
    ViewBag.Title = "Вход";
}

@using (Html.BeginForm("Login","Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new {@class="form-horizontal", role="form"})) 
{
    @Html.AntiForgeryToken()

    <div class="form-group">
        <div class="col-sm-2 control-label">
            
        </div>
        <div class="col-sm-10">
            <h1>@ViewBag.Title</h1>
            <div class="bg-danger" >@Html.ValidationSummary()</div>
        </div>
    </div>
    
    <div class="form-group">
        
        <label for="UserName" class="col-sm-2 control-label">Логин</label>    

        <div class="col-sm-10">
            @Html.TextBoxFor(m => m.UserName, new {@class = "form-control"})
            @Html.ValidationMessageFor(m => m.UserName)
        </div>
    </div>   
      
    <div class="form-group">
        <label for="Password" class="col-sm-2 control-label">Пароль</label>    

        <div class="col-sm-10">
            @Html.PasswordFor(m => m.Password, new {@class = "form-control"})
            @Html.ValidationMessageFor(m => m.Password)
        </div>

    </div>  
      
    <div class="form-group">
        
        <div class="col-sm-offset-2 col-sm-10">
            <div class="checkbox">
                <label>
                    @Html.CheckBoxFor(m => m.RememberMe) Запомнить
                </label>
            </div>
        </div>

    </div>
    
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <button type="submit" class="btn btn-default">Войти</button>
        </div>
    </div>        
    
    <div class="form-group">
        <div class="col-sm-2 control-label">
            
        </div>        
        <div class="col-sm-10">
            @Html.ActionLink("Зарегистрируйтесь", "Register") если вы новый пользователь.
        </div>
    </div>
}

